package app.vendorportal.api.marketplace.data;

import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.math.BigDecimal;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author vince
 */
@XmlRootElement(name = "product")
@XmlAccessorType(XmlAccessType.FIELD)
public class QueryProductResponseItem {

    @XmlElement(name = "vendor-number")
    private String vendorNumber;

    @XmlElement(name = "vendor-sku")
    private String vendorSku;

    @XmlElement(name = "sku")
    private String sku;

    @XmlElement(name = "catalog-id")
    private Integer catalogId;

    @XmlElement(name = "product-category-id")
    private Integer productCategoryId;

    @XmlElement(name = "product-sub-category-id")
    private Integer productSubCategoryId;

    @XmlElement(name = "parentage")
    private String parentage;

    @XmlElement(name = "parent-sku")
    private String parentSku;

    @XmlElement(name = "relationship-type")
    private String relationshipType;

    @XmlElement(name = "variation-theme")
    private String variationTheme;

    @XmlElement(name = "external-product-id-type")
    private String externalProductIdType;

    @XmlElement(name = "external-product-id")
    private String externalProductId;

    @XmlElement(name = "ASIN")
    private String asin;

    @XmlElement(name = "unit-cost")
    private BigDecimal unitCost;

    @XmlElement(name = "item-name")
    private String itemName;

    @XmlElement(name = "product-description")
    private String productDescription;

    @XmlElement(name = "brand-name")
    private String brandName;

    @XmlElement(name = "product-type")
    private String productType;

    @XmlElement(name = "item-type-key-word")
    private String itemTypeKeyword;

    @XmlElement(name = "status")
    private Status status;

    @XmlElementWrapper(name = "product-detail")
    private Map<String, Object> productDetail = new LinkedHashMap<>();

    @Transient
    private String categoryName;

    public static enum Status {
        A, I
    }

    public String getVendorNumber() {
        return vendorNumber;
    }

    public void setVendorNumber(String vendorNumber) {
        this.vendorNumber = vendorNumber;
    }

    public String getVendorSku() {
        return vendorSku;
    }

    public void setVendorSku(String vendorSku) {
        this.vendorSku = vendorSku;
    }

    public String getSku() {
        return sku;
    }

    public void setSku(String sku) {
        this.sku = sku;
    }

    public Integer getCatalogId() {
        return catalogId;
    }

    public void setCatalogId(Integer catalogId) {
        this.catalogId = catalogId;
    }

    public Integer getProductCategoryId() {
        return productCategoryId;
    }

    public void setProductCategoryId(Integer productCategoryId) {
        this.productCategoryId = productCategoryId;
    }

    public Integer getProductSubCategoryId() {
        return productSubCategoryId;
    }

    public void setProductSubCategoryId(Integer productSubCategoryId) {
        this.productSubCategoryId = productSubCategoryId;
    }

    public String getParentage() {
        return parentage;
    }

    public void setParentage(String parentage) {
        this.parentage = parentage;
    }

    public String getParentSku() {
        return parentSku;
    }

    public void setParentSku(String parentSku) {
        this.parentSku = parentSku;
    }

    public String getRelationshipType() {
        return relationshipType;
    }

    public void setRelationshipType(String relationshipType) {
        this.relationshipType = relationshipType;
    }

    public String getVariationTheme() {
        return variationTheme;
    }

    public void setVariationTheme(String variationTheme) {
        this.variationTheme = variationTheme;
    }

    public String getExternalProductIdType() {
        return externalProductIdType;
    }

    public void setExternalProductIdType(String externalProductIdType) {
        this.externalProductIdType = externalProductIdType;
    }

    public String getExternalProductId() {
        return externalProductId;
    }

    public void setExternalProductId(String externalProductId) {
        this.externalProductId = externalProductId;
    }

    public String getAsin() {
        return asin;
    }

    public void setAsin(String asin) {
        this.asin = asin;
    }

    public BigDecimal getUnitCost() {
        return unitCost;
    }

    public void setUnitCost(BigDecimal unitCost) {
        this.unitCost = unitCost;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getProductDescription() {
        return productDescription;
    }

    public void setProductDescription(String productDescription) {
        this.productDescription = productDescription;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public String getItemTypeKeyword() {
        return itemTypeKeyword;
    }

    public void setItemTypeKeyword(String itemTypeKeyword) {
        this.itemTypeKeyword = itemTypeKeyword;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public Map<String, Object> getProductDetail() {
        return productDetail;
    }

    public void setProductDetail(Map<String, Object> productDetail) {
        this.productDetail = productDetail;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }
}
